package com.rc.pojo.po;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import com.mybatisflex.core.handler.JacksonTypeHandler;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 *  实体类。
 *
 * @author 27806
 * @since 2024-07-01
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(value = "plant_item", schema = "rc")
public class PlantItem implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Id(keyType = KeyType.Auto)
    private Long id;

    private String name;

    private String description;

    private String cover;

    @Column(onInsertValue = "0")
    private Boolean adoption;

    @Column(tenantId = true)
    private Long farmId;

    private Long areaId;

    @Column(typeHandler = JacksonTypeHandler.class)
    private List<String> ills = new ArrayList<>();

    @Column(onInsertValue = "0")
    private Integer ripe_num;

    private Integer production;
}
